//
//  typ.h
//  LTLBMC
//
//  Created by GD Huang on 5/17/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#ifndef LTLBMC_typ_h
#define LTLBMC_typ_h



#include "attribute.h"
#include "ikind.h"
#include "fkind.h"
#include "typ.h"
#include "typeinfo.h"
#include "compinfo.h"
#include "enuminfo.h"
#include "astVisitor.h"
#include "OCamlObject.h"


namespace cilast {
    
    
    class exp;
    class compinfo;
    class enuminfo;
    class astVisitor;
    
    class typ : public OCamlObject {
    public:
        virtual int accept(astVisitor*);
    };
    
    
    
    class TVoid : public typ {
    public:    
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
    };
    
    class TInt : public typ {
    public:    
        ikind mikind;
        std::vector<attribute*> mattributes;    
        
        int accept(astVisitor*);
    };
    
    
    class TFloat : public typ {
    public:    
        fkind mfkind;
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
    };
    
    class TPtr : public typ {
    public:    
        typ* mtyp;
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
    };
    
    class TArray : public typ {
    public:    
        typ* mtyp;
        exp* mexp;
        std::vector<attribute*> mattributes;    
        
        int accept(astVisitor*);
    };
    
    class arg {
    public:    
        char* mname;
        typ* mtyp;
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
    };
    
    class TFun : public typ {
    public:    
        typ* mtyp;
        std::vector<arg*> margs;
        bool mbool;
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
        
    };
    
    class TNamed : public typ {
    public:    
        typeinfo* mtypeinfo;
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
    };
    
    class TComp : public typ {
    public:    
        compinfo* mcompinfo;
        std::vector<attribute*> mattributes;
        
        int accept(astVisitor*);
    };
    
    class TEnum : public typ {
    public:    
        enuminfo* menuminfo;
        std::vector<attribute*> mattributes;    
        
        int accept(astVisitor*);
    };
    
    class TBuiltin_va_list : public typ {
    public:    
        std::vector<attribute*> mattributes;
      
        int accept(astVisitor*);
    };
    
}








#endif
